package cn.foolishbird.crow.anomaly;


/**
 * @author foolish bird
 * @version 1.0
 * @date 2019-12-13
 */
public abstract class BaseException extends RuntimeException {

    private static final long serialVersionUID = 4305694221993517496L;

    /**
     * 异常码
     */
    private final int code;

    /**
     * 异常说明
     */
    private final String content;


    public BaseException(int code, String content) {
        this.code = code;
        this.content = content;
    }

    public BaseException(String message, int code, String content) {
        super(message);
        this.code = code;
        this.content = content;
    }

    public BaseException(String message, Throwable cause, int code, String content) {
        super(message, cause);
        this.code = code;
        this.content = content;
    }

    public BaseException(Throwable cause, int code, String content) {
        super(cause);
        this.code = code;
        this.content = content;
    }

    public BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace,
                         int code,
                         String content) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.code = code;
        this.content = content;
    }
}
